<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title><s:text name="title" />
		</title>
	</head>
	<body>
		<s:actionerror />
		<s:fielderror></s:fielderror>
		<p>
			<a href="./main.action"><s:text name="return" /> </a>
			<a href="../login/logOut.action"><s:text name="logOut" /> </a>
		</p>
		<s:if test="#session.user.type==2">
			<p>
				<s:text name="flight"></s:text>
			</p>
			<table cellspacing="1" cellpadding="1" border="1">
				<thead>
					<tr>
						<th align="center">
							<s:text name='flight.name' />
						</th>
						<th align="center">
							<s:text name='airportName' />
						</th>
						<th align="center">
							<s:text name='flightTime' />
						</th>
						<th align="center">
							<s:text name='flight.description' />
						</th>
						<th align="center">
							<s:text name='flight.price' />
						</th>
						<th align="center">
							<s:text name='flight.discount' />
						</th>
						<th align="center">
							<s:text name='airporttTax' />
						</th>
						<th align="center">
							<s:text name='flight.gst' />
						</th>
						<th align="center">
							<s:text name='flight.totalNum' />
						</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td align="left">
							<s:property value="flight.name" />
						</td>
						<td align="left">
							<s:property value="flight.airportName" />
						</td>
						<td align="left">
							<s:property value="flight.flightTime" />
						</td>
						<td align="left">
							<s:property value="flight.description" />
						</td>
						<td align="right">
							<s:property value="flight.price" />
						</td>
						<td align="right">
							<s:property value="flight.discount" />
						</td>
						<td align="right">
							<s:property value="flight.airportTax" />
						</td>
						<td align="right">
							<s:property value="flight.gst" />
						</td>
						<td align="right">
							<s:property value="flight.totalNum" />
						</td>
					</tr>
				</tbody>
			</table>
			<p>
				<s:text name="report" />
			</p>
			<table cellspacing="1" cellpadding="1" border="1">
				<thead>
					<tr>
						<th align="center">
							<s:text name="type" />
						</th>
						<th align="center">
							<s:text name='flight.totalNum' />
						</th>
						<th align="center">
							<s:text name='soldNum' />
						</th>
						<th align="center">
							<s:text name='useRate' />
						</th>
						<th align="center">
							<s:text name='averagePrice' />
						</th>
						<th>
							<s:text name="totalSale" />
						</th>
						<th>
							<s:text name="gstAndAirportTax" />
						</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td align="center">
							<s:text name="day" />
						</td>
						<td align="left">
							<s:property value="dayReportMap.totalNum" />
						</td>
						<td align="left">
							<s:property value="dayReportMap.num" />
						</td>
						<td align="right">
							<s:text name="format.percent"><s:param value="dayReportMap.num*100.0/dayReportMap.totalNum" /></s:text>
						</td>
						<td align="right">
							<s:text name="format.money"><s:param value="dayReportMap.averagePrice" /></s:text>
						</td>
						<td align="right">
							<s:property value="dayReportMap.discount" />
						</td>
						<td align="right">
							<s:property value="dayReportMap.gstAndAirportTax" />
						</td>
					</tr>
					<tr>
						<td align="center">
							<s:text name="week" />
						</td>
						<td align="left">
							<s:property value="WeekReportMap.totalNum" />
						</td>
						<td align="left">
							<s:property value="WeekReportMap.num" />
						</td>
						<td align="right">
							<s:text name="format.percent"><s:param value="WeekReportMap.num*100.0/WeekReportMap.totalNum" /></s:text>
						</td>
						<td align="right">
							<s:text name="format.money"><s:param value="WeekReportMap.averagePrice" /></s:text>
						</td>
						<td align="right">
							<s:property value="WeekReportMap.discount" />
						</td>
						<td align="right">
							<s:property value="WeekReportMap.gstAndAirportTax" />
						</td>
					</tr>
					<tr>
						<td align="center">
							<s:text name="month" />
						</td>
						<td align="left">
							<s:property value="MonthReportMap.totalNum" />
						</td>
						<td align="left">
							<s:property value="MonthReportMap.num" />
						</td>
						<td align="right">
							<s:text name="format.percent"><s:param value="MonthReportMap.num*100.0/MonthReportMap.totalNum" /></s:text>
						</td>
						<td align="right">
							<s:text name="format.money"><s:param value="MonthReportMap.averagePrice" /></s:text>
						</td>
						<td align="right">
							<s:property value="MonthReportMap.discount" />
						</td>
						<td align="right">
							<s:property value="MonthReportMap.gstAndAirportTax" />
						</td>
					</tr>
				</tbody>
			</table>
		</s:if>
	</body>
</html>
